package com.xm.listener;

import com.xm.model.Msg;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "directQueue")
@Slf4j
public class DirectReceiver2 {

    /**
     * 多监听会 轮询消费消息
     * @param msg
     */
    @RabbitHandler
    public void processC(Msg msg){
        log.info("directReceiver[{}](processC)消费者收到消息：{}", 2, msg);
    }

}
